﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MyPhotoShop
{
    public partial class frmMyPhotoShop : Form
    {
        public frmMyPhotoShop()
        {
            InitializeComponent();
        }

        private void frmMyPhotoShop_Load(object sender, EventArgs e)
        {

        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                OpenFileDialog show = new OpenFileDialog();
                show.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";

                if (show.ShowDialog() == DialogResult.OK)
                {
                    pbImage.Image = new Bitmap(show.FileName);
                }
            }

            catch (Exception)
            {
                throw new ApplicationException("Error loading image...");
            }
        }
    }
}
